package com.jxmcloud.business.cut.feign.live;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author liutao
 * @date 20200831
 */
@FeignClient(value="business-live-service", path="/", configuration= LiveClient.LiveRemoteClientConfiguration.class, fallbackFactory= LiveClientFallbackFactory.class)
public interface LiveClient {

    class LiveRemoteClientConfiguration {
        @Bean
        public LiveClientFallbackFactory liveClientFallbackFactory() {
            return new LiveClientFallbackFactory();
        }
    }

    /**
     * feign调用获取用户达标接口
     * @param userId    玄乐用户ID
     * @param startDay  开始时间
     * @param endDay    结束时间
     * 接口文档：http://192.168.12.198:4999/web/#/373/8526
     * @return
     */
    @PostMapping("remote/user/stand/getUserStandardDayLimit")
    String getUserStandardDayLimit(@RequestParam("userId") String userId,@RequestParam("startDay") String startDay,@RequestParam("endDay") String endDay);
}
